{
  "openapi": "3.1.0",
  "info": {
    "title": "Robocorp Actions Server",
    "description": "Robocorp Actions Server",
    "version": "0.1.0"
  },
  "paths": {
    "/api/actions/test/test-action/run": {
      "post": {
        "summary": "Test Action",
        "description": "Greets an employee",
        "operationId": "test_action",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/TestActionInput" }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "title": "Response Test Action",
                  "description": "The greeting"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
              }
            }
          }
        }
      }
    },
    "/api/runs": {
      "get": {
        "summary": "List Runs",
        "operationId": "list_runs_api_runs_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": { "$ref": "#/components/schemas/Run" },
                  "type": "array",
                  "title": "Response List Runs Api Runs Get"
                }
              }
            }
          }
        }
      }
    },
    "/api/runs/{run_id}": {
      "get": {
        "summary": "Show Run",
        "operationId": "show_run_api_runs__run_id__get",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "title": "ID for run" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Run" }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
              }
            }
          }
        }
      }
    },
    "/api/runs/{run_id}/artifacts": {
      "get": {
        "summary": "Get Run Artifacts",
        "operationId": "get_run_artifacts_api_runs__run_id__artifacts_get",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "title": "ID for run" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { "$ref": "#/components/schemas/ArtifactInfo" },
                  "description": "Provides a list with the artifacts available\nfor a given run (i.e.: [{'name': '__action_server_output.txt', 'size_in_bytes': 22}])\n",
                  "title": "Response Get Run Artifacts Api Runs  Run Id  Artifacts Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
              }
            }
          }
        }
      }
    },
    "/api/runs/{run_id}/log.html": {
      "get": {
        "summary": "Get Run Log Html",
        "operationId": "get_run_log_html_api_runs__run_id__log_html_get",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "title": "ID for run" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": { "application/json": { "schema": {} } }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
              }
            }
          }
        }
      }
    },
    "/api/runs/{run_id}/artifacts/text-content": {
      "get": {
        "summary": "Get Run Artifact Text",
        "operationId": "get_run_artifact_text_api_runs__run_id__artifacts_text_content_get",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "title": "ID for run" }
          },
          {
            "name": "artifact_names",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                { "type": "array", "items": { "type": "string" } },
                { "type": "null" }
              ],
              "title": "Artifact names for which the content should be gotten."
            }
          },
          {
            "name": "artifact_name_regexp",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [{ "type": "string" }, { "type": "null" }],
              "title": "A regexp to match artifact names."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": { "type": "string" },
                  "title": "Response Get Run Artifact Text Api Runs  Run Id  Artifacts Text Content Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
              }
            }
          }
        }
      }
    },
    "/api/runs/{run_id}/artifacts/binary-content": {
      "get": {
        "summary": "Get Run Artifact Binary",
        "operationId": "get_run_artifact_binary_api_runs__run_id__artifacts_binary_content_get",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "title": "ID for run" }
          },
          {
            "name": "artifact_name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Artifact name for which the content should be gotten."
            }
          }
        ],
        "responses": {
          "200": { "description": "Successful Response" },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
              }
            }
          }
        }
      }
    },
    "/api/actionPackages": {
      "get": {
        "summary": "List Action Packages",
        "operationId": "list_action_packages_api_actionPackages_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": { "$ref": "#/components/schemas/ActionPackageApi" },
                  "type": "array",
                  "title": "Response List Action Packages Api Actionpackages Get"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Action": {
        "properties": {
          "id": { "type": "string", "title": "Id" },
          "action_package_id": {
            "type": "string",
            "title": "Action Package Id"
          },
          "name": { "type": "string", "title": "Name" },
          "docs": { "type": "string", "title": "Docs" },
          "file": { "type": "string", "title": "File" },
          "lineno": { "type": "integer", "title": "Lineno" },
          "input_schema": { "type": "string", "title": "Input Schema" },
          "output_schema": { "type": "string", "title": "Output Schema" },
          "enabled": { "type": "boolean", "title": "Enabled", "default": true },
          "is_consequential": {
            "anyOf": [{ "type": "boolean" }, { "type": "null" }],
            "title": "Is Consequential"
          }
        },
        "type": "object",
        "required": [
          "id",
          "action_package_id",
          "name",
          "docs",
          "file",
          "lineno",
          "input_schema",
          "output_schema"
        ],
        "title": "Action"
      },
      "ActionPackageApi": {
        "properties": {
          "id": { "type": "string", "title": "Id" },
          "name": { "type": "string", "title": "Name" },
          "actions": {
            "items": { "$ref": "#/components/schemas/Action" },
            "type": "array",
            "title": "Actions"
          }
        },
        "type": "object",
        "required": ["id", "name", "actions"],
        "title": "ActionPackageApi"
      },
      "ArtifactInfo": {
        "properties": {
          "name": { "type": "string", "title": "Name" },
          "size_in_bytes": { "type": "integer", "title": "Size In Bytes" }
        },
        "type": "object",
        "required": ["name", "size_in_bytes"],
        "title": "ArtifactInfo"
      },
      "HTTPValidationError": {
        "properties": {
          "errors": {
            "items": { "$ref": "#/components/schemas/ValidationError" },
            "type": "array",
            "title": "Errors"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "Run": {
        "properties": {
          "id": { "type": "string", "title": "Id" },
          "status": { "type": "integer", "title": "Status" },
          "action_id": { "type": "string", "title": "Action Id" },
          "start_time": { "type": "string", "title": "Start Time" },
          "run_time": {
            "anyOf": [{ "type": "number" }, { "type": "null" }],
            "title": "Run Time"
          },
          "inputs": { "type": "string", "title": "Inputs" },
          "result": {
            "anyOf": [{ "type": "string" }, { "type": "null" }],
            "title": "Result"
          },
          "error_message": {
            "anyOf": [{ "type": "string" }, { "type": "null" }],
            "title": "Error Message"
          },
          "relative_artifacts_dir": {
            "type": "string",
            "title": "Relative Artifacts Dir"
          },
          "numbered_id": { "type": "integer", "title": "Numbered Id" }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "action_id",
          "start_time",
          "run_time",
          "inputs",
          "result",
          "error_message",
          "relative_artifacts_dir",
          "numbered_id"
        ],
        "title": "Run"
      },
      "TestActionInput": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Name of the employee"
          }
        },
        "type": "object",
        "required": ["name"],
        "title": "TestActionInput"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] },
            "type": "array",
            "title": "Location"
          },
          "msg": { "type": "string", "title": "Message" },
          "type": { "type": "string", "title": "Error Type" }
        },
        "type": "object",
        "required": ["loc", "msg", "type"],
        "title": "ValidationError"
      }
    }
  }
}
